<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>词多多代理商平台</title>
    <include file="Index:header" />
    <script type="text/javascript">
        $(function(){
            $(".help-side dl dd:eq(3)").addClass('cur');
            $("#top #topcon .nav li:eq(1)").addClass('cur');
        })
    </script>
    <script src="__PUBLIC__/js/main.js" type="text/javascript" charset="UTF-8"></script>
    <style type="text/css">
        .formcon{padding:10px 0;}
            /* flow_steps */
        #grxx{ margin-left:2px;width:41%}
        #zjxx{width:40%}
        .flow_steps{height:23px;overflow:hidden;}
        .flow_steps li{;float:left;height:23px;padding:0 40px 0 30px;line-height:23px;text-align:center;
            background:url(__PUBLIC__/images/barbg.png) no-repeat 100% 0 #E4E4E4;font-weight:bold;}
        .flow_steps li.current_prev{background-position:100% -23px;background-color:#85C143; }
        .flow_steps li.current{color:#fff;background-color:#FF7902;}
        .flow_steps li#zjxx.current,.flow_steps li.last{background-image:none;}
    </style>
</head>
<body>
<include file="Index:top"/>
<div id="main" style="overflow:hidden;">
    <include file="User:left"/>
    <div id="main_right" class="container">
        <div class="title" style="font-size:16px;color:#FF7902">主词客户</div>
        <div id="infotab" class="container mt10">
            <ul class="tb cl">
                <li style="width:50%;">
                    <div>
                        <div align="center"><img src="__PUBLIC__/images/userface.gif" title="添加精准词客户"/></div>
                        <div align="center"><a href="useradd.html">精准词客户</a></div>
                    </div>
                </li>
                <li>
                    <div>
                        <div align="center"><img src="__PUBLIC__/images/userface.gif" title="添加精准词客户"/></div>
                        <div align="center"><a href="useraddkeyword"><span style="color:#FF7902">主词客户</span></a></div>
                    </div>
                </li>
            </ul>
        </div>
        <div class="formbox">
            <div class="flow_steps">
                <ul>
                    <li id="grxx" class="current">客户信息</li>
                    <li id="zjxx" class="last">添加站点 主词</li>
                </ul>
            </div>
            <div class="formcon">
                <div id="one">
                    <form name="form1" id="form1" class="form" showOnMouseOver="false">
                        <table border=1 bordercolor=#e7e7e7 cellpadding=4 width="100%">
                            <tr align="center">
                                <td colspan='3' bgcolor="#F6F7F6"><span class="StepTitle" style="text-align:center;">填写客户信息</span>
                                </td>
                            </tr>
                            <tr align="center">
                                <td width="30%">用&nbsp;户&nbsp;名</td>
                                <td style="border-right-style:none;">
                                    <input type="text" name="userName" id="userName" class="validate[required,length[2,12]] input"/>
                                </td>
                                <td width="40%" style="border-left-style:none;"  align="left"><div class="validation_info">请输入用户名</div></td>
                            </tr>
                            <tr align="center">
                                <td>密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码</td>
                                <td style="border-right-style:none;">
                                    <input type="password" name="password" id="password" class="validate[required,length[6,20]] input"/>
                                </td>
                                <td style="border-left-style:none;"  align="left"><div class="validation_info">请输入密码</div></td>
                            </tr>
                            <tr align="center">
                                <td>重复密码</td>
                                <td style="border-right-style:none;">
                                    <input type="password" name="psd" id="psd" class="validate[required,length[6,20],confirm[password]] input"/>
                                </td>
                                <td style="border-left-style:none;"  align="left"><div class="validation_info">请再次输入密码</div></td>
                            </tr>
                            <tr align="center">
                                <td>真实姓名</td>
                                <td style="border-right-style:none;">
                                    <input type="text" name="realName" id="realName" class="validate[required,length[2,12]] input"/>
                                </td>
                                <td style="border-left-style:none;"  align="left"><div class="validation_info">请输入真实姓名</div></td>
                            </tr>
                            <tr align="center">
                                <td>公司名称</td>
                                <td style="border-right-style:none;">
                                    <input type="text" name="company" id="company" class="validate[required,length[5,50]] input"/>
                                </td>
                                <td style="border-left-style:none;"  align="left"><div class="validation_info">请输入公司名称</div></td>
                            </tr>
                            <tr align="center">
                                <td>手机号码</td>
                                <td style="border-right-style:none;">
                                    <input type="text" name="mobile" id="mobile"  class="validate[required,custom[mobilephone]] input"/>
                                </td>
                                <td style="border-left-style:none;"  align="left"><div class="validation_info">请输入手机号码</div></td>
                            </tr>
                            <tr align="center">
                                <td>电子邮箱</td>
                                <td style="border-right-style:none;">
                                    <input type="text" name="email" id="email" class="validate[required,custom[email]] input"/>
                                </td>
                                <td style="border-left-style:none;" align="left"><div class="validation_info">请输入电子邮箱</div></td>
                            </tr>
                            <tr align="center">
                                <td>开户类型</td>
                                <td style="border-right-style:none; padding-left:30px;">
                                    <div id="useroption" class="dropdown" tabIndex="1">
                                        <select id="otn" name="otn" style="width:150px;">
                                            <option value="">请选择开户类型</option>
                                            <volist name="acounttype" id="vo">
                                                <option value="{$vo['id']}">{$vo['name']}</option>
                                            </volist>
                                        </select>
                                    </div>
                                </td>
                                <td style="border-left-style:none;" align="left"><span id="acountmoney" style="margin-left:20px;">请选择开户类型</span></td>
                            </tr>
                            <tr align="center">
                                <td>充值金额</td>
                                <td style="border-right-style:none;">
                                    <input type="text" name="money" id="money" class="validate[required,custom[zhengshu] input"/>
                                </td>
                                <td style="border-left-style:none;" align="left"><div class="validation_info" id="recharge"></div></td>
                            </tr>
                            <tr align="center">
                                <td>开户后余额</td>
                                <td style="border-right-style:none;">
                                    <span id="yue"></span>
                                </td>
                                <td style="border-left-style:none;" align="left"></td>
                            </tr>
                            <tr align="center">
                                <td>支付安全码</td>
                                <td style="border-right-style:none;">
                                    <input type="password" name="safecode" id="safecode"/>
                                </td>
                                <td style="border-left-style:none;" align="left"><div class="validation_info">请输入支付安全码</div></td>
                            </tr>
                            <tr align="center">
                                <td colspan="3">
                                    <input type="button" id="btn" class="button_s green" value="下一步" onclick="validateForm('#form1','__URL__/useraddsave')"/>
                                </td>
                            </tr>
                        </table>
                        <input type="hidden" name="userType" value="common"/>
                    </form>
                </div>
                <div id="two"  style="display:none;">
                    <div class="container mt10">
                        <div class="title">添加站点 主词</div>
                        <form name="form2" id="form2" class="form" showOnMouseOver="false">
                            <table class="tableStyle" formMode="line" failAlert="表单填写不正确，请按要求填写！"
                                   cellpadding="10px;"style="margin-top:20px;
                             margin-left:80px;
                            margin-bottom:20px;">
                                <tr>
                                    <td align="right"><strong>网站域名：</strong>
                                    </td>
                                    <td>
                                        <input type="text" name="domain" id="domain"
                                               class="validate[required,custom[domain]] input"/>
                                    </td>
                                    <td colspan="4">
                                        <div class="validation_info">如：www.baidu.com</div>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right"><strong>网站名称：</strong>
                                    </td>
                                    <td class="rtd">
                                        <input type="text" class="validate[required,custom[chinese],length[4,20] input"
                                               name="Webname" id="Webname"/>
                                    </td>
                                    <td colspan="4">
                                        <div class="validation_info">请输入站点名称</div>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right"><strong>关键词：</strong>
                                    </td>
                                    <td>
                                        <input type="text" name="keywords[]" class="validate[required,length[2,20]]] input">
                                    </td>
                                    <td align="right">
                                        <strong>价格：(元/天)</strong>
                                    </td>
                                    <td>
                                        <input type="text" name="moneys[]"
                                               class="validate[required,custom[zhengshu]] input"></td>
                                    <td>
                                        <div class="J_add remove ico ico_application_form_add"></div>
                                    </td>
                                    <td><div class="validation_info"></div></td>
                                </tr>
                                <tbody id="keywords"></tbody>
                                <tr>
                                    <td colspan="6" style="text-align:center;">
                                        <input type="button" class="button_s green" value="提交" onclick="validateForm('#form2','__URL__/addsitekeyword')"/>
                                    </td>
                                </tr>
                            </table>
                            <input type="hidden" name="uname" id="uname"/>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<include file="Index:footer"/>
<script type="text/javascript">
    function one() {
        $("#one").hide();
        $("#two").show();
        $("#grxx").attr("class", "current_prev");
        $("#zjxx").attr("class", "current");
        userName=$("#userName").val();
        uname=$("#uname").val(userName);
    }

    function two() {
        $("#two").hide();
        $("#three").show();
        $("#grxx").attr("class", "done");
        $("#zjxx").attr("class", "current_prev");
        $("#qzxx").attr("class", "current");
    }

    $(function () {
        $("#useroption").sSelect();
    });
    $("#otn").change(function(){

        var id = $('#otn option:selected').val();
        $.ajax({
            url:"__URL__/userchargemoney",
            type: 'POST',
            data: {"id":id},
            cache: false,
            dataType: "json",
            success: function(data) {
                if (data.status == "true") {
                    $("#acountmoney").html("扣费金额为"+data.money+"元");
                    window.money=parseInt(data.money);
                    $("#recharge").html("主词不扣费,充值金额不得少于"+ window.money +"元");
                } else {
                    msgwarn(data.Msg);
                }
            }
        });
    });

    $("#money").blur(function(){
        mony=$(this).val();
        if(mony<window.money){
            alert("充值金额不得少于"+window.money+"元");
            $("#btn").attr("disabled","true");
        }else{
            $("#btn").removeAttr("disabled");
            $("#yue").html(mony-window.money+"元");
        }
    });

</script>
</body>
</html>